home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(status != "game over")
- {
- this._x += (_parent._xmouse - this._x) / 3;
- if(this._x - this._width / 2 < _parent.play_area._x - _parent.play_area._width / 2)
- {
- this._x = _parent.play_area._x - _parent.play_area._width / 2 + this._width / 2;
- }
- else if(_parent.play_area._x + _parent.play_area._width / 2 < this._x + this._width / 2)
- {
- this._x = _parent.play_area._x + _parent.play_area._width / 2 - this._width / 2;
- }
- }
- if(status == "play")
- {
- if(_parent.num_enemy_ships == 0)
- {
- _parent.current_round = _parent.current_round + 1;
- if(_parent.rounds < _parent.current_round)
- {
- _parent.create_boss(_parent.current_level,_parent.xctr,_parent.yctr);
- _parent.current_level = _parent.current_level + 1;
- _parent.current_round = 1;
- status = "boss";
- }
- else if(_parent.current_round == _parent.rounds - 1)
- {
- _parent.bez_ship.active = true;
- _parent.num_enemy_ships = 1;
- status = "bez ship";
- }
- else
- {
- _parent.create_new_string(_parent.current_level,_parent.current_round,_parent.xctr,_parent.yctr,_parent.space_x,_parent.space_y,_parent.num_ships_x,_parent.num_ships_y);
- }
- num_fired = 0;
- depth = 100;
- var j = 0;
- while(j < _parent.num_ships_x * _parent.num_ships_y)
- {
- enemies_left[j] = j;
- j++;
- }
- }
- frames++;
- if(frames % (num_enemy_frames - _parent.current_round * 2 - _parent.current_level * 2) == 0)
- {
- _parent.enemy_bullet.duplicateMovieClip("enemy_bullet" + num_enemy_shots,num_enemy_shots + 50);
- j = enemies_left[Math.floor(Math.random() * enemies_left.length)];
- _parent["enemy_bullet" + num_enemy_shots].x = _parent["enemy" + j]._x;
- _parent["enemy_bullet" + num_enemy_shots].y = _parent["enemy" + j]._y;
- num_enemy_shots++;
- }
- }
- }
-